﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace HQWeb.SysManage.UserManage
{
    /// <summary>
    /// CheckUserName 的摘要说明
    /// </summary>
    public class CheckUserName : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string strUserSysmbol = context.Request["name"].Trim();
            string strID = context.Request["id"].Trim();
            BLL.SysManage.T_PUB_USER bll = new BLL.SysManage.T_PUB_USER();
            Model.SysManage.T_PUB_USER model;
            model = bll.GetModelByUserSymbol(strUserSysmbol);
            if (model != null && strID != model.USER_ID.ToString()&&model.ISUSED==true)
            {    
                context.Response.Write(strUserSysmbol+"已经存在");
            }
        }
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}